package cn.com.cifi.mars.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;

import cn.com.cifi.mars.constant.IsDeleteEnum;
import cn.com.cifi.mars.entity.MdmProjectPatner;
import cn.com.cifi.mars.mapper.mars.ProjectPatnerMapper;
import cn.com.cifi.mars.service.ProjectPatnerService;

/**
 * <p>
 * （主数据）项目-合作方 服务实现类
 * </p>
 *
 * @author yyd
 * @since 2019-09-24
 */
@Service
public class ProjectPatnerServiceImpl extends ServiceImpl<ProjectPatnerMapper, MdmProjectPatner> implements ProjectPatnerService {

	@Autowired
	private ProjectPatnerMapper projectPatnerMapper;
	
	@Override
	public MdmProjectPatner selectByProjectIdAndPartnerNo(String projectId, String partnerNo) {
		return projectPatnerMapper.selectByProjectIdAndPartnerNo(projectId,partnerNo,IsDeleteEnum.NO.getKey());
	}
	@Override
	public void updateByProjectIdAndPartnerNo(MdmProjectPatner projectPatner) {
		projectPatnerMapper.updateByProjectIdAndPartnerNo(projectPatner);
		
	}

	@Override
	public MdmProjectPatner selectByFidAndPartnerNo(String projectId) {
		return projectPatnerMapper.selectByPartnerNo(projectId, "100000");
	}
	@Override
	public void insertPartnerList(List<MdmProjectPatner> list) {
		 projectPatnerMapper.insertPartnerList(list);
	}

}
